/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	ThreadTask.cpp
*
*	Comments	-	See ThreadTask.h
*
**************************************************************************************/
#include "../Include/ThreadTask.h"

namespace Pulse
{
	ThreadTask::ThreadTask( void )
	{
		m_bStatusOwner = TRUE;
		m_pTaskStatus = new TaskStatus;
		m_pTaskStatus->SetBusy();
	}

	ThreadTask::ThreadTask( TaskStatus *pStatus ) 
	{ 
		m_bStatusOwner = FALSE;
		m_pTaskStatus = pStatus;
		m_pTaskStatus->SetBusy();
	}

	ThreadTask::~ThreadTask( void )
	{
		if ( m_bStatusOwner )
			delete m_pTaskStatus;
	}
}